﻿//-----------------------------------------------------------------------
// <copyright file="NannyStatusFactory.cs" company="Mulala">
//     Copyright Mulala. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Mulala.Cavan.Domain.MainBoundedContext.NannyModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Domain.MainBoundedContext.Setting;

    public static class NannyStatusFactory
    {
        public static NannyStatus CreateNannyStatus(
                                        DateTime basicInfoCheckedTime,
                                        NannyIdentifier.CheckedStatus basicInfoStatus,
                                        DateTime avatarCheckedTime,
                                        NannyIdentifier.CheckedStatus avatarStatus,
                                        DateTime recommendTime,
                                        DateTime recommendTimeout,
                                        DateTime systemRecommendTime,
                                        DateTime systemRecommendTimeout,
                                        DateTime freeTimeout,
                                        DateTime VIPTimeout,
                                        DateTime refreshTime,
                                        int refreshCount,
                                        NannyIdentifier.OnLineStatus onLineStatus,
                                        NannyIdentifier.BidStatus bidStatus,
                                        DateTime editTime,
                                        string editUser)
        {
            NannyStatus nannyStatus = new NannyStatus();
            nannyStatus.AvatarCheckedTime = avatarCheckedTime;
            nannyStatus.AvatarStatus = avatarStatus;
            nannyStatus.BasicInfoCheckedTime = basicInfoCheckedTime;
            nannyStatus.BasicInfoStatus = basicInfoStatus;
            nannyStatus.EditTime = editTime;
            nannyStatus.EditUser = editUser;
            nannyStatus.FreeTimeout = freeTimeout;
            nannyStatus.OnLineStatus = onLineStatus;
            nannyStatus.BidStatus = bidStatus;
            nannyStatus.RecommendTime = recommendTime;
            nannyStatus.RecommendTimeout = recommendTimeout;
            nannyStatus.RefreshTime = refreshTime;
            nannyStatus.RefreshCount = refreshCount;
            nannyStatus.SystemRecommendTime = systemRecommendTime;
            nannyStatus.SystemRecommendTimeout = systemRecommendTimeout;
            nannyStatus.VIPTimeout = VIPTimeout;
            nannyStatus.CreateTime = DateTime.Now;

            return nannyStatus;
        }

        public static NannyStatus CreateNannyStatus(string editUser)
        {
            return NannyStatusFactory.CreateNannyStatus(DateTime.Parse(Project.Settings.DefaultTime), NannyIdentifier.CheckedStatus.UnChecked, DateTime.Parse(Project.Settings.DefaultTime), NannyIdentifier.CheckedStatus.UnChecked,
                DateTime.Parse(Project.Settings.DefaultTime), DateTime.Now, DateTime.Parse(Project.Settings.DefaultTime), DateTime.Now, DateTime.Now.AddMonths(Project.Settings.FreeDuration), DateTime.Now,
                DateTime.Parse(Project.Settings.DefaultTime), 0, NannyIdentifier.OnLineStatus.OffLine, NannyIdentifier.BidStatus.CanBid, DateTime.Now, editUser);
        }
    }
}
